package kr.aow.member.dao;

import java.util.List;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import kr.aow.vo.MemberDTO;

public class MemberDaoiBatis extends SqlMapClientDaoSupport implements IMemberDao{
	
	
	
	@Override
	public List<MemberDTO> getMemberList() {
		return  getSqlMapClientTemplate().queryForList("Member.getMember");
	}
	@Override
	public int insertMember(MemberDTO member) {
		return getSqlMapClientTemplate().update("Member.insertMember", member);
	}

	@Override
	public MemberDTO getMember(String mb_id) {
		return (MemberDTO)getSqlMapClientTemplate().queryForObject("Member.getMember", mb_id);
	}

	@Override
	public int updateMember(MemberDTO member) {
		return getSqlMapClientTemplate().update("Member.updateMember", member);
	}

	@Override
	public int deleteMember(String mb_id) {
		return getSqlMapClientTemplate().update("Member.deleteMember", mb_id);
	}

}
